from django.core.mail import send_mail
from celery_tasks.main import app


# name 就是给任务设置一个名字，默认是脚本路径名
@app.task(name='email')
def send_active_email(subject, message, from_email, recipient_list, html_message):
    send_mail(subject=subject,
              message=message,
              from_email=from_email,
              recipient_list=recipient_list,
              html_message=html_message)